//导入instance
import instance from '@/utils/axios.js'
// import {getToken} from '@/utils/token.js'
/* 1.登录接口 */
function getLogin({mobile,code}) {
    return instance({
        url: '/v1_0/authorizations',
        method: 'post',
        data: {
            mobile,
            code
        }
    })
}
//导出
export { getLogin }
/* 2.获取个人信息 */
function getUserInfo() {
    return instance({
        url: '/v1_0/user/profile',
        method: 'get',
        // headers:{Authorization:`Bearer ${getToken().token}`}
    })
}

//导出
export { getUserInfo }
function editUserInfo(obj) {
    return instance({
        url: '/v1_0/user/profile',
        method: 'PATCH',
        data:obj,
        // headers:{Authorization:`Bearer ${getToken().token}`}
    })
}
export { editUserInfo }
function editPhoto(fd) {
    return instance({
        url: '/v1_0/user/photo',
        method: 'PATCH',
        data:fd,
        // headers:{Authorization:`Bearer ${getToken().token}`}
    })
}
export { editPhoto }
